Rails.application.routes.draw do

  post 'users/toggle_playlist'
  post 'users/toggle_pick'
  post 'users/toggle_fav'
  post 'users/add_history'
  post 'users/song_view_count_increment'

  get 'search', to: 'search#index'
  get 'search/query_text'

  get 'mine', to: 'mine#index'
  get 'mine/song_fav'
  get 'mine/playlist_fav'
  get 'mine/picklist'
  get 'mine/history'

  get 'recommend', to: 'recommend#index' #4.选择性的跳去页面, 推荐页

  get 'rank', to: 'rank#index'

  resources :playlists, only: [:index, :show]

  resources :mvs, only: :index

  get 'singers/choose', to: 'singers#choose'
  resources :singers, only: [:index, :show]

  get 'test', to: 'test#index' # 4.选择性的跳去页面, 测试页

  get 'fullscreen_play', to: 'fullscreen_play#index'

  get 'page', to: 'page#index', as: :login # 1.初始页面, 2.跳去认证
  get 'page/index', to: 'page#index'
  get 'page/index.html', to: 'page#index'
  get 'page/order_authenticate', as: :order_auth #3.请求平台鉴权接口
  get 'page/order_result', as: :order_result
  get 'page/to_order', as: :platform_order # 平台统一订购接口

  get 'page/no_valid' # 无法观看
  get '/undefined', to: 'page#epg_back_url' # 从Cookies里取 epg_back_url 异常时候的页面

  root 'page#index'
  # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
